{# @copyright   Copyright (C) 2010-2021 Combodo SARL #}
{# @license     http://opensource.org/licenses/AGPL-3.0 #}
{% apply spaceless %}
    <div id="{{ oUIBlock.GetId() }}" class="{{ oUIBlock.GetBlockCode() }}">
        <div>
            <table style="width:100%" class="transparent">
                <tr>
                    <td><a href="{{ oUIBlock.sDownloadLink }}" class="ibo-block-csv--download-link ibo-button ibo-is-alternative ibo-is-primary">{{ 'UI:Download-CSV'|dict_format(oUIBlock.sCsvFile) }}</a>{{ oUIBlock.sCharsetNotice }}</td>
                    <td style="text-align:right">
                        <input type="checkbox" {{ oUIBlock.sChecked }} onClick="window.location.href='{{ oUIBlock.sLinkToToggle }}'">
                        &nbsp;{{ 'UI:CSVExport:AdvancedMode'|dict_s }}
                    </td>
                </tr>
            </table>
            {% if oUIBlock.bAdvancedMode %}
                <p>
                    {{ 'UI:CSVExport:AdvancedMode+'|dict_s }}
                </p>
            {% endif %}
        </div>

        <div id="csv_content_loading">
            <div style="width: 250px; height: 20px; background: url(../setup/orange-progress.gif); border: 1px #999 solid; margin-left:auto; margin-right: auto; text-align: center;">
                {{ 'UI:Loading'|dict_s }}
            </div>
        </div>
        <textarea id="csv_content" style="display:none;"></textarea>
    </div>
{% endapply %}